<?php

namespace app\common\model;

use think\Db;
use think\Model;

class MemberViews extends Model
{
    protected $auto = [];
    protected $insert = ['num' => 1, 'date_time', 'create_time', 'update_time'];
    protected $update = ['update_time'];

    /**
     * 设置今天
     * @return false|int
     */
    protected function setDateTimeAttr()
    {
        return strtotime('today');
    }

    /**
     * 设置创建时间
     * @return int
     */
    protected function setCreateTimeAttr()
    {
        return time();
    }

    /**
     * 设置更新时间
     * @return int
     */
    protected function setUpdateTimeAttr()
    {
        return time();
    }
}
